package com.action.service;

import com.action.entity.HistoryStock;
import com.action.entity.Redpacket;
import com.action.entity.SystemNotice;
import com.action.entity.UserAliSncode;
import com.action.entity.UserCommentVO;
import com.action.entity.UserHelper;
import com.action.entity.XyBUserRecvRed;
import com.action.entity.UserRedpacket;
import com.action.entity.WXPAYBEAN;
import com.base.app_core.model.RedPacketVo;
import com.base.app_core.model.TaskVo;
import com.base.app_core.model.params.BindMobileParam;
import com.base.app_core.service.Retrofit.HttpResult;
import com.base.app_core.service.user.model.BindAliUserAcount;
import com.base.app_core.service.user.model.User;
import com.base.app_core.util.AppConstants;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.POST;

/**
 * Created by jiansheng.li on 2017/5/2.
 */

public interface ChildRestServer {


    @POST(AppConstants.URLCONST.SEND_PACKET)
    Observable<HttpResult<RedPacketVo>> sendPacket(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.WXPAY)
    Observable<HttpResult<WXPAYBEAN>> wXPay(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCH_USER_ACCOUNT)
    Observable<HttpResult<User>> fetchUserDetail();

    @POST(AppConstants.URLCONST.FETCHNEARREDPACKET)
    Observable<HttpResult<List<Redpacket>>> fetchNearRedPacket();

//    @POST(AppConstants.URLCONST.BINDUSERMOBILE)
//    Observable<HttpResult<Map>> bindUserMobile(@Query(AppConstants.FIELD.MOBILE) String phone,
//                                               @Query(AppConstants.FIELD.SMSCODE) String smscode);

    @POST(AppConstants.URLCONST.BINDUSERMOBILE)
    Observable<HttpResult<BindAliUserAcount>> bindUserMobile(@Body BindMobileParam data);

    @POST(AppConstants.URLCONST.FETCHREDPACKETDETAIL)
    Observable<HttpResult<XyBUserRecvRed>> fetchRedPacketDetail(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCHREDUSERLIST)
    Observable<HttpResult<List<UserRedpacket>>> fetchRedUserList(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.POSTCOMMENT)
    Observable<HttpResult<Map>> postComment(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCHCOMMENTLIST)
    Observable<HttpResult<List<UserCommentVO>>> fetchCommentList(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCHRECVHISTORYREDPACKETS)
    Observable<HttpResult<List<XyBUserRecvRed>>> fetchRecvHistoryRedPackets(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCHSENDHISTORYREDPACKETS)
    Observable<HttpResult<List<XyBUserRecvRed>>> fetchSendHistoryRedPackets(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.OPENREDPACKET)
    Observable<HttpResult<Object>> openRedPacket(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.SYSTEM_FETCH_HISTORY_STOCK)
    Observable<HttpResult<List<HistoryStock>>> fetchHistoryStock();

    @POST(AppConstants.URLCONST.INDEX_SYSTEM_NOTICE)
    Observable<HttpResult<List<SystemNotice>>> fetchSystemNotice();

    @POST(AppConstants.URLCONST.ALIPAY)
    Observable<HttpResult<String>> AliPay(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.TASK)
    Observable<HttpResult<List<TaskVo>>> taskView();

    @POST(AppConstants.URLCONST.SUBMIT_TASK)
    Observable<HttpResult<Object>> submitTask(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.INDEX_GET_COS_KEY)
    Observable<HttpResult<Map>> indexGetCosKey(@Body Map<String, Object> params);

    @POST(AppConstants.URLCONST.CHECKREDSNOPENSTATE)
    Observable<HttpResult<Map>> checkRedSnOpenState(@Body Map<String, Object> sn);

    @POST(AppConstants.URLCONST.USER_HELPER)
    Observable<HttpResult<UserHelper>> fetchUserHelper();

    @POST(AppConstants.URLCONST.DEFAULT_ALI_SNCODE)
    Observable<HttpResult<UserAliSncode>> getDefaultAliSncode(@Body Map<String, Object> params);


}
